export function getWeekInYear() {
    var endDate: any = new Date(),
        curYear: any = endDate.getFullYear(),
        startDate: any = new Date(curYear, 0, 1);

    var startWeek = startDate.getDay(),
        offsetWeek = 0;

    if (startWeek != 1) {
        offsetWeek = 1;
        if (!startWeek) {
            startDate.setDate(1);
        } else {
            startDate.setDate(8 - startWeek);
        }
    }
    var distanceTimestamp = endDate - startDate,
        days = Math.ceil(distanceTimestamp / (24 * 60 * 60 * 1000)) + startWeek,
        weeks = Math.ceil(days / 7) + offsetWeek;
    return weeks;
}

export const AnnoTypes = [
    {
        id: 1,
        label: "普通公告",
        value: 1,
        color: "#123456"
    },
    {
        id: 2,
        label: "重要公告",
        value: 2,
        color: "#f50"
    },
    {
        id: 3,
        label: "紧急公告",
        value: 3,
        color: "deeppink"
    },
    {
        id: 4,
        label: "置顶公告",
        value: 14,
        color: "yellow"
    }
]

export const AdviseTypes: any = [
    {
        title: "one",
        value: "服务意见",
        label: "服务意见",
        children: [
            {
                value: "教学服务",
                title: "one_1",
                label: "教学服务",
            },
            {
                value: "后勤服务",
                title: "one_2",
                label: "后勤服务",
            },
            {
                value: "回访服务",
                title: "one_3",
                label: "回访服务",
            },
            {
                value: "就业服务",
                title: "one_3",
                label: "就业服务",
            }
        ],
    },
    {
        value: "教学意见",
        title: "two",
        label: "教学意见",
        children: [
            {
                value: "班主任意见",
                title: "two_1",
                label: "班主任意见",
                children: [
                    {
                        value: "态度服务",
                        title: "two_1_1",
                        label: "态度服务",
                    },
                    {
                        value: "生活关怀",
                        title: "two_1_2",
                        label: "生活关怀",
                    }
                ]
            },
            {
                value: "讲师意见",
                title: "two_2",
                label: "讲师意见",
                children: [
                    {
                        value: "帮助服务",
                        title: "two_1_1",
                        label: "帮助服务",
                    },
                    {
                        value: "技术服务",
                        title: "two_1_2",
                        label: "技术服务",
                    }
                ]
            }
        ]
    },
    {
        title: "three",
        value: "其他意见",
        label: "其他意见",
        children: [
            {
                value: "生活意见",
                title: "three_1",
                label: "生活意见",
            },
            {
                value: "服务意见",
                title: "three_2",
                label: "服务意见",
            },
            {
                value: "前台意见",
                title: "three_3",
                label: "前台意见",
            },
        ],
    },
]